﻿<%@ Page Title="Report - Multimedia" Language="C#" MasterPageFile="~/user.master"
    AutoEventWireup="true" Inherits="MediaMonitor.Users.Report_NewAlertToday" Theme="default"
    CodeBehind="report-NewAlertToday.aspx.cs" MaintainScrollPositionOnPostback="true" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Charting" Assembly="Telerik.Web.UI" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="Server">
    <link href="../rad-scripts/Grid.MyCustomSkin.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function doSaveAs() {

            var bSuccess;
            bSuccess = document.execCommand('SaveAs');
        }
    </script>
    <style>
        .modalLogin
        {
            background-color: White;
            font-family: Verdana;
            font-size: 12px;
            text-align: left;
            border-radius: 5px;
        }
        .modalBackground
        {
            background-color: Gray;
            filter: alpha(opacity=70);
            opacity: 0.7;
        }
         .hideShowChart
    {
        padding: 0 10px 20px!important;
        }
        .hideShowChart1
    {
        margin: 0 0 0 15px!important;
        }
        .backdiv
        {
            background-color: #EEEEEE;
    border: 1px solid #CCCCCC;
    display: inline-block;
    padding: 10px 8px;
    width: 98%;
            }
    </style>
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Body" runat="Server">
    <%-- <asp:UpdatePanel ID="pnlUpdate" runat="server">
        <ContentTemplate>--%>
           <img id="imgLogo" runat="server" />
    <iframe id="frmDownload" width="1 " height="1" frameborder="0"></iframe>
    <script type="text/javascript">
        function GetDownload(id, type) {
            var iframe = document.getElementById("frmDownload");
            iframe.src = "../sitefiles/NewsAlert.aspx?id=" + id + "&type=" + type;
        }
    </script>
     <script type="text/javascript" src="../js/tablepaging.js"></script>
  <script type="text/javascript">
      $(document).ready(function () {
          $('#ctl00_ctl00_Body_Body_radGrid_ctl00').tablePagination({});
          $('#aHideChart').click(function () {
              $('#ctl00_ctl00_Body_Body_RadChartResult').hide();
              $('#divSummary').addClass('hideShowChart1');
              $('#divExport').addClass('hideShowChart');
          });
          $('#aShowChart').click(function () {
              $('#ctl00_ctl00_Body_Body_RadChartResult').show();
              $('#divSummary').removeClass('hideShowChart1');
              $('#divExport').removeClass('hideShowChart');
          });
          $('#tablePagination').addClass('backdiv');
      });
    </script>
     <div id="InnerDIVTOP" runat="server" visible="false">
        <div id="divSummary" style="width:55px; margin:225px 0 0 15px; float: right; ">
            <table width="100%" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td align="right">
                        <asp:Panel runat="server" ID="PnlAdv" Visible="false">
                            <span style="padding-left: 10px;">Advertiser :</span>
                            <asp:Button ID="btnDownloadAllAdv" runat="server" Text="Download All" />
                        </asp:Panel>
                    </td>
                    <td align="right">
                        <asp:Panel runat="server" ID="PnlProduct" Visible="false">
                            <span style="padding-left: 10px;">Product:</span>
                            <asp:Button ID="btnDownloadAllProduct" runat="server" Text="Download All" />
                        </asp:Panel>
                    </td>
                    <td align="right">
                        <asp:Panel runat="server" ID="pnlCategory" Visible="false">
                            <span style="padding-left: 10px;">Category :</span>
                            <asp:Button ID="btnDownloadAll" runat="server" Text="Download All" />
                        </asp:Panel>
                    </td>
                    <td align="right" style="width: 15%;">
                        <asp:Button ID="btnExport" runat="server" Text="Export" OnClick="btnExport_Click" />
                    </td>
                </tr>
            </table>
        </div>
      <div id="divChart" style="float: right;">
       <a id="aHideChart" href="javascript:void(0)">Hide Chart</a>&nbsp;&nbsp;<a id="aShowChart" href="javascript:void(0)">Show Chart</a>
             <telerik:RadChart ID="RadChartResult" ChartTitle-TextBlock-Text="Report" runat="server"
        Height="240px" Width="320px" AutoLayout="true" AutoTextWrap="false" DefaultType="Bar">
        <PlotArea>
            <YAxis>
            </YAxis>
            <XAxis>
            </XAxis>
        </PlotArea>
        <Series>
            <telerik:ChartSeries Name="Series 1" ActiveRegionToolTip="Click here" DataLabelsColumn="NewsAlertSTATUS"
                DataYColumn="VALUE">
                <Appearance LegendDisplayMode="ItemLabels">
                </Appearance>
            </telerik:ChartSeries>
        </Series>
        <telerik:ChartTitle>
            <TextBlock Text="Postback Events">
            </TextBlock>
        </telerik:ChartTitle>
    </telerik:RadChart></div>
        <div id="divExport" style="float: right; padding: 225px 10px 20px;">
            <asp:LinkButton ID="lnlBack" runat="server" Text="..Go back to summary.." Font-Size="16"
                OnClick="lnlBack_Clicked"></asp:LinkButton>
        </div>
           
    </div>
    <div id="SummaryDIVTOP" runat="server" visible="false">
        <div style="text-align: right; padding-right: 10px; padding-bottom: 5px;">
            <table cellpadding="0" cellspacing="0" border="0" width="100%">
                <tr>
                    <td width="10%" align="left">
                        <asp:Label ID="lblSummary" runat="server" Text="SUMMARY" ForeColor="#0066FF" Font-Size="14"></asp:Label>
                    </td>
                    <td align="right" width="90%">
                        <table width="100%" cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <td align="right">
                                    <asp:Panel runat="server" ID="pnlSummaryAdv" Visible="false">
                                        <span style="padding-left: 10px;">Advertiser :</span>
                                        <asp:Button ID="btnDownloadAllSummaryAdvertiser" runat="server" Text="Download All" />
                                    </asp:Panel>
                                </td>
                                <td align="right">
                                    <asp:Panel runat="server" ID="pnlSummaryProduct" Visible="false">
                                        <span style="padding-left: 10px;">Product:</span>
                                        <asp:Button ID="btnDownloadAllSummaryProduct" runat="server" Text="Download All" />
                                    </asp:Panel>
                                </td>
                                <td align="right">
                                    <asp:Panel runat="server" ID="pnlSummaryCategory" Visible="false">
                                        <span style="padding-left: 10px;">Category:</span>
                                        <asp:Button ID="btnDownloadAllSummary" runat="server" Text="Download All" />
                                    </asp:Panel>
                                </td>
                                <td align="right" style="width: 25%;">
                                    <asp:Button ID="btnExportSummary" runat="server" Text="Export with Summary" OnClick="btnExportSummary_Click" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <telerik:RadGrid ID="radGridAll" runat="server" AutoGenerateColumns="false" AllowSorting="True"
        GridLines="Both" PageSize="20" ItemStyle-Font-Size="7" EnableEmbeddedSkins="false"
        Skin="MyCustomSkin" EnableEmbeddedBaseStylesheet="False" OnNeedDataSource="radGridAll_NeedDataSource"
        MasterTableView-AllowPaging="false" OnItemCommand="radGridAll_ItemCommand">
        <MasterTableView Name="ReportAll" ItemStyle-BorderWidth="1" DataKeyNames="CountTV,CountRadio">
            <AlternatingItemStyle Font-Size="Small" />
            <ItemStyle Font-Size="Small" />
            <Columns>
                <telerik:GridTemplateColumn ItemStyle-Width="20px" UniqueName="MediaType">
                    <ItemTemplate>
                        <%--<asp:Label ID="lblMTN" Text='<%#Eval("MediaType")%>' runat="server" Visible="false"></asp:Label>--%>
                        <img src="../images/media/NC.png" alt="N&C" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn ItemStyle-Width="400" UniqueName="CountRecord" HeaderText="News & Comment Total Records">
                    <ItemTemplate>
                        <table width="100%">
                            <tr>
                                <td>
                                    Found <b>
                                        <%#Eval("CountTV")%></b> records of News & Comments In
                                    <asp:LinkButton ID="lnkTV" runat="server" ForeColor="#52729B" CommandName="TV">TV</asp:LinkButton>
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Found <b>
                                        <%#Eval("CountRadio")%></b> records of News & Comments In
                                    <asp:LinkButton ID="LnkRadio" runat="server" ForeColor="#00B050" CommandName="Radio">Radio</asp:LinkButton>
                                </td>
                                <td align="right">
                                    Total Records Found:<b><%#Eval("Totalrecord")%></b>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Found <b>
                                        <%#Eval("CountPress")%></b> records of News & Comments In
                                    <asp:LinkButton ID="LnkPress" runat="server" ForeColor="#943634" CommandName="Press">Press</asp:LinkButton>
                                </td>
                                <td>
                                    <!--download for TV-->
                                </td>
                            </tr>
                             <tr>
                                <td>
                                    Found <b>
                                        <%#Eval("CountINTERNET")%></b> records of News & Comments In
                                    <asp:LinkButton ID="LinkButton1" runat="server" ForeColor="#E01B6A" CommandName="Internet">Internet</asp:LinkButton>
                                </td>
                                <td>
                                    <!--download for TV-->
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn ItemStyle-Width="235" UniqueName="Video" ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkGetDetail" runat="server" CommandName="GetDetail" Text="Click for Details">
                        </asp:LinkButton>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
    <asp:ObjectDataSource ID="objDSAll" runat="server" TypeName="MediaMonitor.Common.ReportFuncs"
        SelectMethod="GetReportAll_NewsAlertToday" SelectCountMethod="GetReportAllNewsAlert"
        StartRowIndexParameterName="startRowIndex" MaximumRowsParameterName="maximumRows"
        OnSelecting="objDSAll_Selecting" SortParameterName="sortColumn" EnablePaging="true">
        <SelectParameters>
            <asp:Parameter Name="code" Type="String" DefaultValue="" />
            <asp:Parameter Name="Date" Type="String" DefaultValue="" />
            <asp:Parameter Name="Calificacion" Type="String" DefaultValue="" />
            <asp:Parameter Name="Company" Type="String" DefaultValue="" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <telerik:RadChart ID="ChartAvenueReport" ChartTitle-TextBlock-Text="Report" runat="server"
        Height="450px" Width="800px">
        <PlotArea>
            <YAxis MaxValue="80">
            </YAxis>
            <XAxis MaxValue="1">
            </XAxis>
        </PlotArea>
        <Series>
            <telerik:ChartSeries Name="series 1" ActiveRegionToolTip="Click here" DataLabelsColumn="NewsAlertSTATUS"
                DataYColumn="VALUE">
                <Appearance LegendDisplayMode="ItemLabels">
                </Appearance>
            </telerik:ChartSeries>
        </Series>
        <telerik:ChartTitle>
            <TextBlock Text="Postback Events">
            </TextBlock>
        </telerik:ChartTitle>
    </telerik:RadChart>
    <asp:HiddenField ID="hdnID" runat="server" ClientIDMode="Static" />
    <div id="InnerDIV" runat="server" style="display: none;clear:both;">
     <div class="backdiv"> <div style="float:left;">
  News By Media Type:   <asp:DropDownList ID="ddlMediaType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlMediaType_SelectedIndexChanged">
    <asp:ListItem Text="ALL"></asp:ListItem>
    <asp:ListItem Text="INTERNET"></asp:ListItem>
    <asp:ListItem Text="PRESS"></asp:ListItem>
    <asp:ListItem Text="RADIO"></asp:ListItem>
    <asp:ListItem Text="TV"></asp:ListItem>
    </asp:DropDownList>
    </div>
    <div style="float:right;">
    Sort News By:
<asp:DropDownList ID="ddlSortNews" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlSortNews_SelectedIndexChanged">
<asp:ListItem Text="Media Type"></asp:ListItem>
<asp:ListItem Text="Title"></asp:ListItem>
<asp:ListItem Text="Chronological"></asp:ListItem>
<asp:ListItem Text="Most Recent"></asp:ListItem>
</asp:DropDownList>    
    </div></div>
        <telerik:RadGrid ID="radGrid" runat="server" AutoGenerateColumns="false" AllowSorting="True"
            GridLines="Both" PageSize="20" ItemStyle-Font-Size="7" EnableEmbeddedSkins="false"
            Skin="MyCustomSkin" EnableEmbeddedBaseStylesheet="False" OnNeedDataSource="radGrid_NeedDataSource"
            OnItemCommand="radGrid_ItemCommand" MasterTableView-AllowPaging="false">
            <MasterTableView Name="Report" ShowFooter="true" ItemStyle-BorderWidth="1" DataKeyNames="ID">
                <FooterStyle Font-Bold="true" ForeColor="AliceBlue" />
                <GroupHeaderItemStyle Font-Bold="true" Font-Size="Larger" />
                <AlternatingItemStyle Font-Size="Smaller" />
                <ItemStyle Font-Size="Smaller" />
                <Columns>
                    <telerik:GridTemplateColumn HeaderStyle-Width="30px" ItemStyle-Width="30px" UniqueName="MediaType">
                        <ItemTemplate>
                            <img src='../images/media/<%#Eval("MediaTypeName")%>.png' alt='<%#Eval("MediaTypeName")%>' />
                            <asp:Label ID="lblNews" runat="server" Text='<%#Eval("ID") %>' Visible="false"></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn HeaderText="News & Alert" HeaderStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <img src='../images/media/<%#Eval("Calification")%>.png' alt='<%#Eval("MediaTypeName")%>' />&nbsp;&nbsp;&nbsp;<b
                                style="color: #0066FF;"><%#Eval("Title")%></b><br />
                            <br />
                            <b style="color: #cd9035">Fecha:</b><b style="color: #253e5c; font-weight: normal;"><%# Convert.ToDateTime(Eval("RFDate")).ToString("d")%></b>&nbsp;&nbsp;&nbsp;<b
                                style="color: #cd9035"><asp:Label ID="lblHora" runat="server" Text='<%# Eval("MediaTypeName").ToString() == "Press" ? "Pagina": "Hora" %>'></asp:Label></b><b
                                    style="color: #253e5c; font-weight: normal;"><%# Eval("PageorHour") %></b>&nbsp;&nbsp;&nbsp;<b
                                        style="color: #cd9035">Duracion:</b><b style="color: #253e5c; font-weight: normal;"><%# Eval("Duration") %></b>&nbsp;&nbsp;&nbsp;<b
                                            style="color: #cd9035">Medio:</b><b style="color: #253e5c; font-weight: normal;"><%#Eval("MediaDescription") %></b>&nbsp;&nbsp;&nbsp;<b
                                                style="color: #cd9035">Seccion:</b><b style="color: #253e5c; font-weight: normal;"><%# Eval("SectionDescription") %></b>&nbsp;&nbsp;&nbsp;<b
                                                    style="color: #cd9035;">
                                                    <asp:LinkButton ID="lnkCalificación" runat="server" Text="Calificación:" ForeColor="#cd9035"
                                                        Font-Bold="true" CommandName="Calificación"></asp:LinkButton></b>
                            <div id="divCalificación" runat="server" visible="false">
                                <asp:DropDownList ID="ddlCalificación" runat="server">
                                    <asp:ListItem Text="Positiva"></asp:ListItem>
                                    <asp:ListItem Text="Negativa"></asp:ListItem>
                                    <asp:ListItem Text="Neutra"></asp:ListItem>
                                </asp:DropDownList>
                                <br />
                                <asp:ImageButton ID="imgbtnCalificación" runat="server" SkinID="Save" CommandName="SaveCalificación" />
                            </div>
                            <b style="color: #253e5c; font-weight: normal;">
                                <asp:Label ID="lblCalification" runat="server" Text='<%# Eval("Calification")%>'></asp:Label></b>&nbsp;&nbsp;&nbsp;<b
                                    style="color: #cd9035">
                                    <asp:LinkButton ID="lnkImportancia" runat="server" Text="Importancia:" ForeColor="#cd9035"
                                        Font-Bold="true" CommandName="Importancia"></asp:LinkButton></b><b style="color: #253e5c;
                                            font-weight: normal;">
                                            <div id="divImportancia" runat="server" visible="false">
                                                <asp:DropDownList ID="ddlImportancia" runat="server">
                                                    <asp:ListItem Text="1"></asp:ListItem>
                                                    <asp:ListItem Text="2"></asp:ListItem>
                                                    <asp:ListItem Text="3"></asp:ListItem>
                                                    <asp:ListItem Text="4"></asp:ListItem>
                                                    <asp:ListItem Text="5"></asp:ListItem>
                                                </asp:DropDownList>
                                                <br />
                                                <asp:ImageButton ID="imgbtnImportancia" runat="server" SkinID="Save" CommandName="SaveImportancia" />
                                            </div>
                                            <asp:Label ID="lblImportancia" runat="server" Text='<%# Eval("Important") %>'></asp:Label></b><br />
                            <p style="color: #27436a; font-size: 10px;">
                                <asp:Label ID="lblNewsSummary" runat="server" Text='<%# Eval("NewsSummary").ToString().Replace("?", "ñ") %>'></asp:Label>
                            </p>
                            <p style="text-align: center">
                                <asp:LinkButton ID="lnkReadMore" runat="server" ForeColor="#722932" CommandName="ReadMore"
                                    CommandArgument='<%# Eval("ID") %>' Text="Read More"></asp:LinkButton></p>
                            <p style="text-align: center">
                                <asp:LinkButton ID="lnkBrand" runat="server" CommandName="BrandCount" CommandArgument='<%# Eval("ID") %>'>People or brands Involved(<%# Eval("SumColumn") %>)</asp:LinkButton>
                            </p>
                            <div id="ReadMoreDiv" runat="server" visible="false">
                                <telerik:RadGrid ID="radGridReadMore" runat="server" AutoGenerateColumns="false"
                                    AllowSorting="True" GridLines="Both" PageSize="20" ItemStyle-Font-Size="7" EnableEmbeddedSkins="false"
                                    Skin="MyCustomSkin" EnableEmbeddedBaseStylesheet="False" MasterTableView-AllowPaging="false">
                                    <MasterTableView Name="Report" ShowFooter="true" ItemStyle-BorderWidth="1" DataKeyNames="ID">
                                        <FooterStyle Font-Bold="true" ForeColor="AliceBlue" />
                                        <GroupHeaderItemStyle Font-Bold="true" Font-Size="Larger" />
                                        <AlternatingItemStyle Font-Size="Smaller" />
                                        <ItemStyle Font-Size="Smaller" />
                                        <Columns>
                                            <telerik:GridTemplateColumn HeaderStyle-Width="30px" ItemStyle-Width="30px" HeaderText="News">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblNews" runat="server" Text='<%#Eval("News") %>'></asp:Label>
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                        </Columns>
                                    </MasterTableView>
                                    <ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true">
                                    </ClientSettings>
                                    <ClientSettings AllowDragToGroup="True" AllowColumnsReorder="true" ReorderColumnsOnClient="true">
                                        <Resizing AllowColumnResize="true" />
                                    </ClientSettings>
                                </telerik:RadGrid>
                            </div>
                            <p style="float: right;">
                                <a href="javascript:void(0);" onclick="PopupCenter('../sitefiles/NewsAlertvideo.aspx?SectionCode=<%#Eval("SectionCode")%>&t=f&ID=<%#Eval("ID")%>', '_blank', 350, 280); "
                                    style='display: <%#Eval("MediaTypeCode").ToString() == "1" ? "inline" : "none"  %>'>
                                    <span style='color: <%#MediaMonitor.Common.Utility.CheckVideoAvailabilityNewsAlert(Eval("ImageAudioVideoName").ToString())==true ? "green" : "red"%>;'>
                                        View </span></a>
                                <!--view for Radio-->
                                <a href="javascript:void(0);" onclick="PopupCenter('../sitefiles/NewsAlertradio.aspx?SectionCode=<%#Eval("SectionCode")%>&t=f&ID=<%#Eval("ID")%>', '_blank', 350, 280); "
                                    style='display: <%# Eval("MediaTypeCode").ToString() == "3"? "inline" : "none"  %>'>
                                    <span style='color: <%#MediaMonitor.Common.Utility.CheckRadioAvailabilityNewsAlert(Eval("ImageAudioVideoName").ToString())==true ? "green" : "red"%>;'>
                                        View </span></a>
                                <!--view for PRESS-->
                                <a href="javascript:void(0);" onclick="PopupCenterWithScroll('../sitefiles/NewsAlertpress.aspx?ID=<%#Eval("ID")%>&t=s&file=<%#Eval("ImageAudioVideoName")%>', '_blank', 750, 700); ">
                                    <span style='color: <%# MediaMonitor.Common.Utility.ToStr(Eval("ImageAudioVideoName"))!="" ? "green" : "red"%>;'>
                                        <%#MediaMonitor.Common.Utility.GetFormattedBool(MediaMonitor.Common.Utility.ToInt(Eval("MediaTypeCode")) == 6 && MediaMonitor.Common.Utility.CheckPressAvailabilityNewsAlert(MediaMonitor.Common.Utility.ToStr(Eval("ImageAudioVideoName")).ToString()), "Preview", "")%>
                                    </span></a>
                                     <a href="javascript:void(0);" onclick="PopupCenterWithScroll('../sitefiles/NewsAlertInternet.aspx?ID=<%#Eval("ID")%>&t=s&file=<%#Eval("ImageAudioVideoName")%>', '_blank', 750, 700); ">
                                    <span style='color: <%# MediaMonitor.Common.Utility.ToStr(Eval("ImageAudioVideoName"))!="" ? "green" : "red"%>;'>
                                        <%#MediaMonitor.Common.Utility.GetFormattedBool(MediaMonitor.Common.Utility.ToInt(Eval("MediaTypeCode")) == 9 && MediaMonitor.Common.Utility.CheckInternetAvailabilityNewsAlert(MediaMonitor.Common.Utility.ToStr(Eval("ImageAudioVideoName")).ToString()), "Preview", "")%>
                                    </span></a>/
                                <!--download for TV-->
                                <a onclick='javascript:GetDownload("<%#Eval("ID")%>", "tv"); return false;' href="javascript:void(0);"
                                    style='display: <%#Eval("MediaTypeCode").ToString() == "1" ? "inline" : "none"  %>'>
                                    Download</a>
                                <!--download for Radio-->
                                <a onclick='javascript:GetDownload("<%#Eval("ID")%>", "radio"); return false;' href="javascript:void(0);"
                                    style='display: <%#Eval("MediaTypeCode").ToString() == "3" ? "inline" : "none"  %>'>
                                    Download</a>
                                <!--download for PRESS-->
                                <a onclick='javascript:GetDownload("<%#Eval("ID")%>", "press"); return false;' href="javascript:void(0);"
                                    style='display: <%#Eval("MediaTypeCode").ToString() == "6" ? "inline" : "none"  %>'>
                                    Download</a>
                                      <a onclick='javascript:GetDownload("<%#Eval("ID")%>", "Internet"); return false;' href="javascript:void(0);"
                                    style='display: <%#Eval("MediaTypeCode").ToString() == "9" ? "inline" : "none"  %>'>
                                    Download</a>
                            </p>
                            <p style="float: left">
                                <asp:LinkButton ID="LnkComment" runat="server" ForeColor="#cd9035" CommandName="Comment">Click For Comments</asp:LinkButton>&nbsp;&nbsp;&nbsp;(<%#Eval("Totalrecord")%>
                                Comments)
                            </p>
                            <p>
                                <div id="CommemtDIV" runat="server" visible="false">
                                    <table>
                                        <tr>
                                            <td valign="middle">
                                                Comments
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtComment" runat="server" TextMode="MultiLine" Height="36px" Width="565px"
                                                    placeholder="Comments........" ClientIDMode="Static"></asp:TextBox><asp:HiddenField
                                                        ID="hdnNewsID" runat="server" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                &nbsp;
                                            </td>
                                            <td>
                                                <asp:ImageButton ID="btnUpload" runat="server" SkinID="Save" CommandName="Save" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                <telerik:RadGrid ID="radGridComment" runat="server" AutoGenerateColumns="false" AllowSorting="True"
                                                    GridLines="Both" PageSize="20" ItemStyle-Font-Size="7" EnableEmbeddedSkins="false"
                                                    Skin="MyCustomSkin" EnableEmbeddedBaseStylesheet="False" MasterTableView-AllowPaging="false"
                                                    OnItemCommand="radGridComment_ItemCommand">
                                                    <MasterTableView Name="Report" ShowFooter="true" ItemStyle-BorderWidth="1" DataKeyNames="ID">
                                                        <FooterStyle Font-Bold="true" ForeColor="AliceBlue" />
                                                        <GroupHeaderItemStyle Font-Bold="true" Font-Size="Larger" />
                                                        <AlternatingItemStyle Font-Size="Smaller" />
                                                        <ItemStyle Font-Size="Smaller" />
                                                        <Columns>
                                                            <telerik:GridTemplateColumn HeaderStyle-Width="30px" ItemStyle-Width="30px" HeaderText="Comments">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblID" runat="server" Text='<%#Eval("ID") %>' Visible="false"></asp:Label>
                                                                    <asp:Label ID="lblUserID" runat="server" Text='<%#Eval("UserID") %>' Visible="false"></asp:Label>
                                                                    <asp:Label ID="lblComments" runat="server" Text='<%#Eval("Comments") %>' ForeColor="#0066FF"></asp:Label>
                                                                    <p style="float: right; color: #cd9035;">
                                                                        <a style="color: #cd9035" onclick='javascript:setCommentTextArea("<%#Eval("ID")%>", "<%#Eval("Comments")%>"); return false;'
                                                                            href="javascript:void(0);">
                                                                            <%#MediaMonitor.Common.Utility.GetFormattedBoolID((Eval("UserID").ToString()), "Edit/", "")%></a>
                                                                        <asp:LinkButton ID="LinkDelete" runat="server" ForeColor="#cd9035" CommandName="Delete"> <%#MediaMonitor.Common.Utility.GetFormattedBoolID((Eval("UserID").ToString()), "Delete", "")%></asp:LinkButton></p>
                                                                    <p style="float: right; clear: both;">
                                                                        User:<%#Eval("UserName")%>/<%#Eval("RFDate", "{0:dd/MM/yyyy}")%></p>
                                                                </ItemTemplate>
                                                            </telerik:GridTemplateColumn>
                                                        </Columns>
                                                    </MasterTableView>
                                                    <ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true">
                                                    </ClientSettings>
                                                    <ClientSettings AllowDragToGroup="True" AllowColumnsReorder="true" ReorderColumnsOnClient="true">
                                                        <Resizing AllowColumnResize="true" />
                                                    </ClientSettings>
                                                </telerik:RadGrid>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </p>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true">
            </ClientSettings>
            <ClientSettings AllowDragToGroup="True" AllowColumnsReorder="true" ReorderColumnsOnClient="true">
                <Resizing AllowColumnResize="true" />
            </ClientSettings>
        </telerik:RadGrid>
             <br />
    <br />
    <br />
    
    </div>
    <asp:HiddenField ID="hdn" runat="server" />
    <asp:ModalPopupExtender ID="ModalPopupExtenderAddSubquestion" runat="server" TargetControlID="hdn"
        PopupControlID="PanelAddSubquestion" BackgroundCssClass="modalBackground" DropShadow="true"
        CancelControlID="btnImgCrosLogin" Drag="true" />
    <asp:Panel ID="PanelAddSubquestion" runat="server" Width="400px" CssClass="modalLogin"
        Style="display: none;">
        <table width="100%" style="padding: 10px;">
            
            <tr>
                <td>
                </td>
                <td align="right">
                    <asp:ImageButton ID="btnImgCrosLogin" runat="server" ImageUrl="~/images/cross.png" />
                </td>
            </tr>
            
            <tr>
                <td colspan="2">
                    <asp:ListView ID="lstBrandsAndPeople" runat="server" OnItemCommand="lstBrandsAndPeople_ItemCommand">
                        <LayoutTemplate>
                            <table border="0" cellpadding="1">
                                <tr style="background-color: #E5E5FE">
                                    <th align="left">
                                        <asp:Label ID="lnkId" runat="server">Others Brands Involved</asp:Label>
                                    </th>
                                    <th align="left">
                                        <asp:Label ID="lnkName" runat="server">Others Peoples Involved</asp:Label>
                                    </th>
                                   <tr id="itemPlaceholder" runat="server"></tr>
                                </tr>
                            </table>
                        </LayoutTemplate>
                        <ItemTemplate>
                            <tr>
                                <td>
                                    <asp:Label runat="server" ID="lblName"><%#Eval("OthersBrandsDnvolved")%></asp:Label>
                                </td>
                                <td>
                              <a href='<%#PDFLink(Eval("Name").ToString())%>' target="<%# GetTarget()%>"><%#Eval("Name")%></a>
                                  
                                </td>
                               
                            </tr>
                        </ItemTemplate>
                        <AlternatingItemTemplate>
                            <tr style="background-color: #FFFFFF; color: #284775;">
                                <td>
                                    <asp:Label ID="CountryNameLabel" runat="server" Text='<%# Eval("OthersBrandsDnvolved") %>' />
                                </td>
                                <td>
                                 <a href='<%#PDFLink(Eval("Name").ToString())%>' target="<%# GetTarget()%>"><%#Eval("Name")%></a>
                                 
                                </td>
                            </tr>
                        </AlternatingItemTemplate>
                    </asp:ListView>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    &nbsp;
                </td>
            </tr>
           
        </table>
    </asp:Panel>
    <asp:ObjectDataSource ID="objDS" runat="server" TypeName="MediaMonitor.Common.ReportFuncs"
        SelectMethod="GetReportAll_NewsAlertDetailToday" SelectCountMethod="GetReportAllNewsAlert"
        EnablePaging="true" StartRowIndexParameterName="startRowIndex" MaximumRowsParameterName="maximumRows"
        SortParameterName="sortColumn" OnSelecting="ObjDS_Selecting">
        <SelectParameters>
            <asp:Parameter Name="code" Type="String" DefaultValue="" />
            <asp:Parameter Name="Date" Type="String" DefaultValue="" />
            <asp:Parameter Name="Calificacion" Type="String" DefaultValue="" />
            <asp:Parameter Name="Company" Type="String" DefaultValue="" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="objDSExport" runat="server" TypeName="MediaMonitor.Common.ReportFuncs"
        SelectMethod="getReport_Comment" SelectCountMethod="getReportComment" EnablePaging="true"
        StartRowIndexParameterName="startRowIndex" MaximumRowsParameterName="maximumRows"
        SortParameterName="sortColumn" OnSelecting="ObjDS_SelectingExport">
        <SelectParameters>
            <asp:Parameter Name="NewsID" Type="String" DefaultValue="" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="sqlDSReadMore" runat="server" TypeName="MediaMonitor.Common.ReportFuncs"
        SelectMethod="getReportReadNews_Comment" SelectCountMethod="getReportReadNewsComment"
        EnablePaging="true" StartRowIndexParameterName="startRowIndex" MaximumRowsParameterName="maximumRows"
        SortParameterName="sortColumn" OnSelecting="ObjDSread_Selecting">
        <SelectParameters>
            <asp:Parameter Name="ID" DefaultValue="" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <script type="text/javascript">


        function SetPostion2(obj, width, height) {

            if (!obj)
                return;

            var left = parseInt((screen.availWidth / 2) - (width / 2));
            var top = parseInt((screen.availHeight / 2) - (height));

            var scrollTop = document.body.scrollTop;
            if (scrollTop == 0) {
                if (window.pageYOffset)
                    scrollTop = window.pageYOffset;
                else
                    scrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
            }

            obj.style.left = left + 'px';
            obj.style.top = scrollTop + top + 'px';
            //obj.style.width=width+'px';
            //obj.style.height=height+'px';
            obj.style.position = 'absolute';

        }

        function SetPositionBg2(obj) {
            if (!obj)
                return;

            var left = 0;
            var top = 0;

            var scrollTop = document.body.scrollTop;
            if (scrollTop == 0) {
                if (window.pageYOffset)
                    scrollTop = window.pageYOffset;
                else
                    scrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
            }

            obj.style.left = left + 'px';
            obj.style.top = scrollTop + top + 'px';
            //obj.style.width=width+'px';
            obj.style.height = scrollTop + screen.availHeight + 'px';
            obj.style.position = 'absolute';

        }

        function AjaxLoading2(tbl, dv, bool) {
            if (bool) {
                SetPostion2(document.getElementById(tbl), 350, 200);
                SetPositionBg2(document.getElementById(dv));
                document.getElementById(tbl).style.display = 'block';
                //document.getElementById('dvBg').style.display='block';
            }
            else {
                document.getElementById(tbl).style.display = 'none';
                //document.getElementById('dvBg').style.display='none';
            }
        }

        function setCommentTextArea(id, Comment) {

            document.getElementById('txtComment').value = Comment;
            document.getElementById('hdnID').value = id;

        }
       

    </script>
    <%-- </ContentTemplate>
     

    </asp:UpdatePanel>--%>
</asp:Content>